// JavaScript Document
function documentResize(){
	var leftH = $('#sidebar').height();	
	var autoH = parent.frames.document.body.clientHeight - 162;
	var rightH = parent.document.getElementById('numHeight').value;
	//alert(leftH + "+" + rightH + "+" + autoH);
	parent.document.getElementById('leftFrame').height = leftH + 8 + "px";
		if(leftH > rightH && leftH > autoH){
			//alert(1);
			parent.frames.document.getElementById('mainFrame').height = leftH - 12 + "px";
			} else if( autoH > rightH){
				//alert(2);
				parent.frames.document.getElementById('mainFrame').height = autoH + "px";
			} else {
				//alert(3);
				parent.frames.document.getElementById('mainFrame').height = (Number(rightH) + 30) + "px";
			}
	}